(use-package no-littering
  :demand t
  :custom
  (auto-save-file-name-transforms `
   (
    (".*" ,
     (no-littering-expand-var-file-name "auto-save/") t)))) ; 设置自动保存文件目录

;; 临时文件存放
(use-package recentf
  :after no-littering
  :demand t
  :custom
  (recentf-exclude '
   (no-littering-var-directory
    no-littering-etc-directory));屏蔽临时文件
  (recentf-max-menu-items 25)
  (recentf-max-saved-items 25)
  :bind
  ("C-x C-r" . 'recentf-open-files)
  :config
  (recentf-mode 1))

(use-package which-key
  :ensure t
  :config
  (which-key-mode)
  ;; 设置 which-key 提示位置
  (setq which-key-popup-type 'minibuffer) ; 可以设置为 'minibuffer 或 'side-window
  ;; 设置 which-key 显示延迟时间
  (setq which-key-idle-delay 0.5)
  ;; 设置 which-key 的展示样式
  (setq which-key-separator " → "))

;; (use-package marginalia
;;   :ensure t
;; )
;; (marginalia-mode t)

(use-package orderless
  :ensure t
)
(setq completion-styles '(orderless))

;; 优化后（使用 :config 自动启用）
;; (use-package vertico
;;   :config
;;   (vertico-mode))

(provide 'init-tools)
